grammar Type;
import BaseLexer,BaseGrammar;

program
    :
    type
    ;

type
    :
    name                                            # referType
    | primitiveTypeEnum                             # primitiveType
    | type OpenBracket CloseBracket                 # arrayType
    | type LessThan type (Comma type)*  GreaterThan    # genericType
    | Void                                          # voidType
    ;

primitiveTypeEnum
    :
    String      # stringType
    | Boolean   # booleanType
    | Int       # intType
    | Float     # floatType
    | Double    # doubleType
    | Long      # longType
    | Any       # anyType
    ;
